package cn.itcast.bos.service.base.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import cn.itcast.bos.dao.base.StandardRespository;
import cn.itcast.bos.domain.base.Standard;
import cn.itcast.bos.service.base.StandardService;
@Service
public class StandardServiceImpl implements StandardService {
	//ע�� Dao   ��ΪSpringData ���JPA ����Dao�ı�д
	@Autowired
	private StandardRespository standardRespository;
	@Override
	public void save(Standard standard) {
		standardRespository.save(standard);

	}
	
	@Override
	public Page<Standard> findPageData(Pageable pageable) {
		Page<Standard> page = standardRespository.findAll(pageable);
		return page;
	}
	//查询所有取件标准
	@Override
	public List<Standard> findAll() {
	List<Standard> standards = standardRespository.findAll();
		return standards;
	}

}
